package com.houxm.jbapu.pool;

public class ConnectionParam {

	private String name;					// 连接池名称
	private boolean active = true;			// 连接池状态
	private String driver;                  // 数据库驱动程序
    private String url;                     // 数据连接的 URL 
    private String user;                    // 数据库用户名
    private String password;                // 数据库密码
    private int minConnections = 10;		// 初始化连接数
    private int initialConnections = 10;	// 连接池的初始大小
    private int incrementalConnections = 5;	// 连接池自动增加的大小
    private int maxConnections = 50;		// 最大连接数
    private long timeoutValue = 3600000;	// 连接的最大空闲时间 ms
    private long everyWait = 1000;			// 取连接的时候如果没有可用连接的每次等待时间 ms
    private long waitTimes = 10;			// 取连接的时候如果没有可用连接最大的等待次数
    private boolean isCheakPool = true;		// 是否定时检查连接池  
    private long lazyCheck = 1000*60*60;	// 延迟多少时间后开始 检查 ms
    private long periodCheck = 1000*60*60;	// 检查频率  ms
	
    
    public ConnectionParam(String name, String driver, String url, String user, String password) {
		super();
		this.name = name;
		this.driver = driver;
		this.url = url;
		this.user = user;
		this.password = password;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public boolean isActive() {
		return active;
	}


	public void setActive(boolean active) {
		this.active = active;
	}


	public String getDriver() {
		return driver;
	}


	public void setDriver(String driver) {
		this.driver = driver;
	}


	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}


	public String getUser() {
		return user;
	}


	public void setUser(String user) {
		this.user = user;
	}


	public String getPassword() {
		return password;
	}


	public void setPassword(String password) {
		this.password = password;
	}


	public int getMinConnections() {
		return minConnections;
	}


	public void setMinConnections(int minConnections) {
		this.minConnections = minConnections;
	}


	public int getInitialConnections() {
		return initialConnections;
	}


	public void setInitialConnections(int initialConnections) {
		this.initialConnections = initialConnections;
	}


	public int getIncrementalConnections() {
		return incrementalConnections;
	}


	public void setIncrementalConnections(int incrementalConnections) {
		this.incrementalConnections = incrementalConnections;
	}


	public int getMaxConnections() {
		return maxConnections;
	}


	public void setMaxConnections(int maxConnections) {
		this.maxConnections = maxConnections;
	}


	public long getTimeoutValue() {
		return timeoutValue;
	}


	public void setTimeoutValue(long timeoutValue) {
		this.timeoutValue = timeoutValue;
	}


	public long getEveryWait() {
		return everyWait;
	}


	public void setEveryWait(long everyWait) {
		this.everyWait = everyWait;
	}


	public long getWaitTimes() {
		return waitTimes;
	}


	public void setWaitTimes(long waitTimes) {
		this.waitTimes = waitTimes;
	}


	public boolean isCheakPool() {
		return isCheakPool;
	}


	public void setCheakPool(boolean isCheakPool) {
		this.isCheakPool = isCheakPool;
	}


	public long getLazyCheck() {
		return lazyCheck;
	}


	public void setLazyCheck(long lazyCheck) {
		this.lazyCheck = lazyCheck;
	}


	public long getPeriodCheck() {
		return periodCheck;
	}


	public void setPeriodCheck(long periodCheck) {
		this.periodCheck = periodCheck;
	}
	
}
